package todo_app

type EventHandleFunc func(e string, args interface{})
type EventHandler struct {
	ID      string
	Handler EventHandleFunc
}

type IEventBus interface {
	Pub(e string, args interface{})
	Sub(e string, id string, handleFunc EventHandleFunc)
	Unsub(e string, id string)
}

const EventTodoCreated = "todo.created"
const EventTodoUpdated = "todo.updated"
const EventTodoRemoved = "todo.removed"
